Dialog class options
The following options are specific to dialogs.
- -apply (C)
- Specifies that an apply button should appear on the form. Also
signifies that only the buttons specified with either a button,
callback or label reference will be used on the dialog (as opposed to
the default buttons for the dialog). If no buttons are specified, the
default buttons for that dialog will appear. (This is not applicable
to Message dialogs since there is no apply button.)
- -applyCallback cmd (C)
- Command cmd to call when apply button is pressed.
- -applyLabel string (CS)
- Sets the apply button label string.
- -autoDestroy boolean (CS)
- If boolean is TRUE, the dialog is automatically
destroyed after the user presses either OK or Cancel on the dialog
box. The default is TRUE. If FALSE, the dialog must be destroyed
with VtDestroy. Note
that this option is only valid in Selection, FileSelection, and
Message dialogs.
- -autoHide boolean (CS)
- If TRUE, the dialog is automatically hidden after the user
presses either OK or Cancel on the dialog box. The default is TRUE.
If FALSE, the dialog must be destroyed with VtHide. Note that this
option is only valid in Selection, FileSelection, and Message dialogs.
- -cancel (C)
- Specifies that a cancel button should appear on the form. Also
signifies that only the buttons specified with either a button,
callback or label reference will be used on the dialog (as opposed to
the default buttons for the dialog). If no buttons are specified, the
default buttons for that dialog will appear.
- -cancelCallback cmd (C)
- Callback cmd to call when you press the cancel button
in a dialog.
- -cancelLabel string (CS)
- Sets the cancel button label string.
- -defaultButton OK | APPLY | RESET | CANCEL | HELP | widgetName (CS)
- Sets the default button for a dialog. (The default button is the
one which is selected by default if you press <Return>.) For
dialog boxes that have pre-defined buttons you specify the tokens OK
or APPLY, and so on. If you create a Form dialog yourself you specify
the default button by passing in the widgetName. This
option does not apply to FileSelection dialogs.
- -help (C)
- Specifies that a help button should appear on the form. Also
signifies that only the buttons specified with either a button,
callback or label reference will be used on the dialog (as opposed to
the default buttons for the dialog). If no buttons are specified, the
default buttons for that dialog will appear.
- -helpLabel string (C)
- Sets the label for the help button.
- -modeless (CS)
- Sets the dialog to be modeless. This means that input can go to
any window (as opposed to modal behavior, which means that only the
topmost dialog can accept input).
- -ok (C)
- Specifies that an OK button should appear on the form. Also
signifies that only the buttons specified with either a button,
callback or label reference will be used on the dialog (as opposed to
the default buttons for the dialog). If no buttons are specified, the
default buttons for that dialog will appear.
- -okCallback cmd (C)
- Sets cmd to be the command to call when the OK button
in a dialog is pressed.
Selection and FileSelection dialogs will pass the user's
selection as part of the callback data (which is a keyed list), in the
key selection
Additional callback keys
- selection
- selection in the selection dialog
- -okLabel string (CS)
- Labels the OK button with string.
- -reset (C)
- Specifies that a reset button should appear on the form.
- -resetCallback cmd (C)
- Sets the callback command cmd for the reset button.
- -resetLabel string (CS)
- Sets the label string for the reset button.
- -tabList widgetName list (S)
- Sets the order that widgets within the dialog will be visited by
the <TAB> key. Note that this option only works under character
mode; however, its use is recommended because it can be used to make
character mode screen interfaces more intuitively navigable.
- -wmDecoration ALL | RESIZE | TITLE | BORDER | MENU | MINIMIZE | MAXIMIZE (C)
- Sets the window manager window decoration. This only applies in
the graphical environment under a Motif based window manager. You can
combine more than one option; MINIMIZE and MAXIMIZE only apply on the
first dialog created. For example:
VtFormDialog $ap.form \
-wmDecoration {TITLE RESIZE MENU}
- -wmShadowThickness integer (CS)
- Works only in character mode. Indicates how much of a shadow to
put around dialogs. 0 is no shadow, 1 (the default) is a single
space on the top and left and a single shadow character on the bottom
and right. Numbers above one work but are not optimally designed for
visual appearance. Normally you would set -wmShadowThickness
0 on your main form dialog and any subsequent dialogs
requiring the full width or height of the screen.